<template>
	<div class="postnews" @click="noalter">
		<nav-bar class="nav-bar"></nav-bar>
		<div class="content-main">
			<Tabs>
				<Tab-pane label="编辑文章" icon="compose">
					<news-edit></news-edit>
				</Tab-pane>
				<Tab-pane label="文章管理" icon="ios-browsers">
					<news-manager @openalter="tellMe"></news-manager>
				</Tab-pane>
				<Tab-pane label="文章审核" icon="settings">
					<news-examine></news-examine>
				</Tab-pane>
				<Tab-pane label="绩效考察" icon="flash-off">
					<post-inspect></post-inspect>
				</Tab-pane>
				<Tab-pane label="标签匹配" icon="transgender">
					<tab-match></tab-match>
				</Tab-pane>
			</Tabs>
		</div>
		<transition name="fade">
			<div class="alter" v-if="ifalter" @click.stop="showalter">
				<alter :msg="article"></alter>
			</div>
		</transition>
	</div>
</template>

<script>
import navBar from '@/components/navBar.vue';
import newsEdit from './postNews/newsEdit'
import newsManager from './postNews/newsManager'
import newsExamine from './postNews/newsExamine'
import postInspect from './postNews/postInspect'
import tabMatch from './postnews/tabMatch'
import alter from './postnews/alterInformation'
export default {

	name: 'postNews',

	data () {
		return {
			ifalter: false,
			article:'',
			isAlter:false,
		};
	},
	methods:{
		tellMe(msg){
			this.ifalter=true;
			this.article=msg;
		},
		// tellclose(msg){
		// 	console.log(msg);
		// 	this.ifalter=false
		// },
		showalter(){
			this.ifalter=true
		},
		noalter(){
			this.ifalter=false
		},
	},
	components:{
		navBar,
		newsEdit,
		newsManager,
		newsExamine,
		postInspect,
		tabMatch,
		alter
	},

}
</script>

<style lang="css" scoped>
.postnews{
	width: 100%;
	height: 100%
}
.postnews .alter{
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 40%;
	width: 60%;
}
</style>